home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / graph322.zip / GRAPH.DOC < prev    next >
Text File  |  1990-08-04  |  26KB  |  664 lines

  1. NAME
  2.     graph - plot a tabulated function
  3.  
  4. SYNOPSIS
  5.     graph [file file file] [options]
  6.  
  7. DESCRIPTION
  8.     Graph takes pairs of points (two numbers per line) from the given
  9.     file as x- and y- values and plots them on the screen, connected by
  10.     straight lines.  A string surrounded by quotes "..." may follow a
  11.     pair of points.  This string is a "point label", and will be
  12.     displayed starting at that point.  The program draws axes with
  13.     convenient labels (integers times powers of 1000), plots the data,
  14.     waits for a keypress, then resets the screen parameters and clears
  15.     the screen before exiting.
  16.  
  17.     If no file is specified on the command line, data is read from the
  18.     standard input, which may be redirected.  If data is entered from
  19.     the keyboard, end of data is signaled by typing <cntl>Z.
  20.  
  21.     In the data, blank lines and lines beginning with ';' are ignored.
  22.  
  23.     More than one input file can be specified.  All the data will
  24.     be read before scaling parameters are calculated.  The plot
  25.     will be "broken" at the end of each file.  That is, there will
  26.     be no line connecting the last point of the first file with the
  27.     first point of the second file.  Similarly, if a line starts
  28.     with a null byte (that is, if a line feed is followed by a
  29.     null) the plot will be broken.  Separate curves may also be
  30.     delimited with a point label on the same line as the last point
  31.     on the curve, or by a null byte immediately following the last
  32.     point (see the -b switch).
  33.  
  34.     The -m switch can be used to select the line style or marker
  35.     style for each curve.  If both markers and connecting lines are
  36.     wanted, list the data file twice and specify different styles. 
  37.     For example,
  38.  
  39.         graph gamma gamma -m 1 -30
  40.  
  41.     would give red squares connected by white solid lines on an EGA.
  42.  
  43.     Graph should no longer leave the display in a nonstandard mode.  If it
  44.     does, please let me know.  In the mean time, the display can be
  45.     restored using the DOS command MODE:
  46.     
  47.         mode co80      or     mode mono 
  48.  
  49.     as appropriate.
  50.  
  51. OPTIONS
  52.     Options can appear before, among, or after input file names
  53.     provided a file name cannot be mistaken for the parameter of an
  54.     option.
  55.  
  56. &<name>        (hard copy versions only) Device driver switches are 
  57.         in the configuration file <name>.  See "DEVICE DRIVER 
  58.         CONFIGURATION FILES" below.
  59.  
  60. @<name> or -f <name>
  61.         More parameters (filenames and/or switches) are in the script
  62.         file <name>.  This can be used for lists of parameters
  63.         that are too long for a command line, or merely to save
  64.         retyping lists of parameters.  The parameters in the
  65.         script file have the same format as those on the
  66.         command line, but may be separated by linefeeds as well
  67.         as spaces or tabs.  More than one script file switch
  68.         may appear on the command line, and script files may
  69.         refer to other script files to any depth.  All the
  70.         script files will be read.  For example, if the file
  71.         "curves" contains the line 
  72.             parabola elipse circle 
  73.         and the file "options" contains the lines 
  74.             -g -e -m 20 30 40
  75.         then the command 
  76.             A>graph  @curves  @options 
  77.         is equivalent to 
  78.             A>graph parabola elipse circle -g -e -m 20 30 40 
  79.         In a script file, a semicolon introduces a comment that
  80.         extends to the end of the line.
  81.  
  82. -a  [<step> [<start>]]
  83.         Automatically generate abscissas.  The first argument,
  84.         if present, is the step between values (default 1). 
  85.         The second argument, if present, is the starting value
  86.         (default 0, or first argument from -x switch).
  87.  
  88. -b         break (disconnect) the plot after each label.  (See 
  89.         switch -m to plot the line segments with different
  90.         linestyles.  To break the plot without printing labels,
  91.         use empty labels: "".) This option is set automatically
  92.         if more than one input file or more than one linestyle
  93.         is specified.
  94.  
  95. -c <text>    argument is default label for data points
  96.  
  97. -e        equal vertical and horizontal scales (same number of 
  98.         inches on the display per unit in problem space), so that
  99.         circles don't look like elipses
  100.  
  101. -f <name>    See @<name>.
  102.  
  103. -g        -g with no arguments eliminates the axes.  
  104.  
  105. -g <style> <tics> <width>
  106.         First argument is grid style: 
  107.                0 = no grid and no numeric labels, 
  108.                1 = frame with tic marks inside (default), 
  109.               -1 = frame with tic marks outside the graph area, 
  110.                2 = full grid
  111.                3 = bottom and left axes only
  112.               -3 = bottom and left axes, tic marks on outside.
  113.                4 = bottom and left axes only, separated from plot
  114.               -4 = bottom and left axes, separated from plot, 
  115.                       tic marks on outside.
  116.         Second argument is approximate number of small
  117.         tic marks per numeric label (1 to 10, default 5).  Set
  118.         <tics> to 1 to eliminate small tic marks.  Third
  119.         argument is width of grid lines (default 1).
  120.  
  121. -l <text>    next argument is label for graph (printed at top).  If the
  122.         label starts with a double quote it may contain spaces:
  123.             -l "three cornered hat"
  124.  
  125. -m <n1> <n2> <n3>...
  126.         numeric arguments are linestyles for successive line
  127.         segments (see switch -b).  Each positive argument is a
  128.         number of up to three hex digits WCS, where
  129.             W is the linewidth (0-9, with 0 giving width 1), 
  130.             C is the color (0-f, with 0 being brightest), and 
  131.             S is linestyle (1-5, 1 for solid, 2 for dashed,
  132.                 3 for dotted, etc.) 
  133.         If an argument is -1, the data points are plotted as
  134.         dots not connected by lines.  In general, a negative
  135.         argument -CS generates a marker:
  136.             C is the color (0-f, with 0 being brightest), and 
  137.             S is the marker style (0-9 for box, dot, plus,
  138.               asterisk, hexagon, cross, box, diamond,
  139.               triangle with point down, triangle with point
  140.               up)
  141.  
  142.         The special style FF causes a curve not to be displayed
  143.         at all.  An argument can also include a repeat count,
  144.         as in 3*45 or 4*-205.  
  145.  
  146.         The -m switch will use as many of the following
  147.         parameters as appear to be hex numbers, either negative
  148.         or positive, noteably including the switches -a through
  149.         -f.  This misinterpretation may be avoided by putting
  150.         the -m switch and its arguments last in the command
  151.         line.
  152.  
  153. -n        Omit numeric labels on axes.  This uses more of the screen 
  154.         for the graph, therefore effectively increases
  155.         resolution slightly.  It may also be used when you want
  156.         to make a hard copy and label it with a typewriter.  To
  157.         eliminate both grid and labels, but keep the plot
  158.         scaling the same as if labels were printed, use "-g"
  159.         alone.  For plotter versions, this can be used to add
  160.         more curves to an existing graph.
  161.  
  162. -t        Transpose x and y values before plotting (-x now refers to
  163.         vertical axis).
  164.  
  165. -x[l] [min [max [junk]]] 
  166.         If l is present, x axis is logrithmic. First argument,
  167.         if present, is lower x limit.  Second argument, if
  168.         present, is upper x limit.  A third numeric argument
  169.         may be present but will be ignored.  By default, these
  170.         values are determined automatically.
  171.  
  172. -y[l]   [min [max [junk]]]  
  173.         Similarly for y axis
  174.  
  175. -y[l]m  [min [max [junk]]]  
  176. -ya[p]  [min [max [junk]]]  
  177. -yp[p]  [min [max [junk]]]  
  178.         Any of these signal that each line of the input
  179.         contains the real and imaginary parts of a complex
  180.         number (after the abscissa, unless -a is also used). 
  181.         An 'm' requests that the magnitude of the number
  182.         (square root of sum of squares of real and imaginary
  183.         parts) be plotted.  'p' or 'a' requests the phase
  184.         (atan(imaginary part/real part), also known as the
  185.         argument) be plotted.  The signs of both parts are
  186.         taken into account, so the phase ranges from -pi to
  187.         +pi.  If both real and imaginary parts are zero, the
  188.         phase is arbitrarily assumed to be zero.  An additional
  189.         'p' requests that the phase be divided by pi before
  190.         plotting.
  191.  
  192. -h  <n>        argument is the fraction of the vertical space to be 
  193.         used for the graph.
  194.  
  195. -u  <n>        argument is the fraction of the vertical space to move 
  196.         up before plotting.
  197.  
  198. -w  <n>        argument is the fraction of the horizontal space to be 
  199.         used for the graph (useful if screen dump routine
  200.         doesn't dump the entire width of the screen).
  201.  
  202. -r  <n>        argument is the fraction of the horiz